from em.models.em_basemodel import BaseModel
from em.mysql.em_sqlmanager import engine, metaData
from sqlalchemy.schema import Table
import datetime

# 持仓
class MyKeepFund(BaseModel):

    _table = Table('EM_MY_FUND', metaData, autoload=True)
    BaseModel.loadTable('EM_MY_FUND')

    def __init__(self,stkCode, stkName, stkQty, costPrice, curPrice, profitRate, hProfiteRate, profitMoney, serverTradeDate, serverTradeTime,keepDaysCount, owner='ME'):
        self.stkCode = stkCode
        self.stkName = stkName
        self.stkQty = stkQty
        self.costPrice = costPrice
        self.curPrice = curPrice
        self.profitRate = profitRate
        self.hProfiteRate = hProfiteRate
        self.profitMoney = profitMoney
        self.serverTradeDate = serverTradeDate
        self.keepDaysCount = keepDaysCount
        self.owner = owner
        pass